﻿<CodeSnippetTabbed DocLink="https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxChartSeriesPointImage">
    <CodeSnippetTabPage Text="Razor">@(@"<DxChart Data=""@WeatherForecasts""
         CustomizeSeriesPoint=""@PreparePointImage""
         CssClass=""mw-1100"">
    <DxChartLineSeries AggregationMethod=""@(i => (int)i.Average())""
                       ValueField=""@((WeatherForecast i) => i.TemperatureF)""
                       ArgumentField=""@(i => i.Date.Date)""
                       Name=""Temperature, F"">
        <DxChartSeriesPoint>
            <DxChartSeriesPointImage Width=""50"" Height=""50"" />
        </DxChartSeriesPoint>
    </DxChartLineSeries>
    <DxChartLegend Position=""RelativePosition.Outside"" />
</DxChart>
@code {
    WeatherForecast[] WeatherForecasts;

    protected void PreparePointImage(ChartSeriesPointCustomizationSettings pointSettings)
    {
        IEnumerable<WeatherForecast> dataItems = pointSettings.Point.DataItems.Cast<WeatherForecast>();
        var weatherType = dataItems.GroupBy(x => x.CloudCover).OrderByDescending(x => x.Count()).First().Key;
        pointSettings.PointAppearance.Image.Url = $""_content/BlazorDemo/images/{weatherType}.png"";
    }
}")</CodeSnippetTabPage>
</CodeSnippetTabbed>
